package com.gitee.ywj1352.factory.factory;

import com.gitee.ywj1352.factory.model.Chair;
import com.gitee.ywj1352.factory.model.Furniture;

public class ChairFactory {
    private static volatile ChairFactory singinle;

    public static ChairFactory getFactory(){
        if (singinle != null){
            return singinle;
        }else {
            synchronized (ChairFactory.class){
                singinle = new ChairFactory();
                return singinle;
            }
        }
    }


    public Furniture getChair(){
        return new Chair();
    }

}
